home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Linux
/
Kubuntu 8.10
/
kubuntu-8.10-desktop-i386.iso
/
casper
/
filesystem.squashfs
/
var
/
lib
/
dpkg
/
info
/
hal.postinst
< prev
next >
Wrap
Text File
|
2008-10-26
|
2KB
|
79 lines
#! /bin/sh
# postinst script for hal
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
#
# quoting from the policy:
# Any necessary prompting should almost always be confined to the
# post-installation script, and should be protected with a conditional
# so that unnecessary prompting doesn't happen if a package's
# installation fails and the `postinst' is called with `abort-upgrade',
# `abort-remove' or `abort-deconfigure'.
case "$1" in
configure)
getent passwd haldaemon >/dev/null || \
adduser --system \
--quiet \
--disabled-password \
--no-create-home \
--home "/var/run/hald" \
--gecos "Hardware abstraction layer" \
--quiet \
--group haldaemon
if [ -x /etc/init.d/dbus ]; then
invoke-rc.d dbus force-reload || true
fi
if [ -z "$2" ]; then
# Allow hal to query the PolicyKit database to enforce privileges
if ! /usr/bin/polkit-auth --user haldaemon --explicit | grep -q 'org.freedesktop.policykit.read'; then
/usr/bin/polkit-auth --user haldaemon --grant 'org.freedesktop.policykit.read'
fi
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
triggered)
echo "Regenerating hal fdi cache ..."
rm -f /var/cache/hald/fdi-cache
invoke-rc.d hal restart || true
exit 0
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
# Automatically added by dh_installinit
if [ -x "/etc/init.d/hal" ]; then
update-rc.d hal start 24 2 3 4 5 . stop 16 1 . >/dev/null
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
invoke-rc.d hal start || exit $?
else
/etc/init.d/hal start || exit $?
fi
fi
# End automatically added section
exit 0